home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / prog / dnalib59.arj / SCROLL.BAS < prev    next >
BASIC Source File  |  1993-10-27  |  843b  |  40 lines

  1. DECLARE SUB CalcByte(Attr%,LowByte%,HiByte%)
  2.  
  3. SUB Scroll(Message$,Rev%,Direction%,Row%,Attr%) PUBLIC
  4.  
  5. CalcByte Attr%,FGround%,BGround%
  6.  
  7. EndAddress% = Row% * 160
  8. StartAddress% = EndAddress% - 160
  9. DEF SEG = &HB800
  10. ScrollSave$ = PEEK$(StartAddress%,EndAddress%)
  11.  
  12. COLOR FGround%,BGround%
  13.  
  14.  
  15. IF Direction% = 1 THEN
  16.   FOR i = 1 TO LEN(Message$) * Rev%
  17.   A$ = RIGHT$(Message$,1)
  18.   B$ = LEFT$(Message$,LEN(Message$) - 1)
  19.   Message$ = A$ + B$
  20.   LOCATE Row%,(80 - LEN(Message$))/2,0
  21.   PRINT A$;B$;
  22.   DELAY .1
  23.   NEXT i
  24. ELSE
  25.   FOR j = 1 TO LEN(Message$) * Rev%
  26.   A$ = LEFT$(Message$,1)
  27.   B$ = RIGHT$(Message$,LEN(Message$) - 1)
  28.   Message$ = B$ + A$
  29.   LOCATE Row%,(80 - LEN(Message$))/2,0
  30.   PRINT B$;A$;
  31.   DELAY .1
  32.   NEXT j
  33. END IF
  34.  
  35. LOCATE Row%,(80 - LEN(Message$))/2,0
  36.  
  37. POKE$ StartAddress%,ScrollSave$
  38. DEF SEG
  39.  
  40. END SUB